<template>
	
	<view class="">
		<u-navbar bgColor="#00aa8f" leftText="返回" titleStyle="color:#fff" :autoBack="true" :title="titleName"
			:placeholder="true" :safeAreaInsetTop="true" :border="false">
			<view  class="u-nav-slot  setDisplayCenter " slot="left">
				<u-icon v-if="backIcon"  @click="lastPage" name="arrow-left" size="39" color="#fff"></u-icon>
				<u-line v-if="backIcon" direction="column" :hairline="false" length="28" margin="0 8px"></u-line>
				<view  v-if="showHomeIcon" class="" @click.stop="leftClick">
					<u-icon name="home" size="40" color="#fff"></u-icon>
				</view>
			</view>
				
			<view class="" slot="right">
				<!-- #ifdef APP-PLUS  -->
				<share :url="url" :detailTitle="detailTitle"></share>
				<!-- #endif -->
			</view>
			
		</u-navbar>
	</view>
</template>

<script>
	export default {
		
		props: {
			titleName: {
				type: String,
				default: '才能招标'
			},
			// 是否显示返回图标
			backIcon:{
				type:Boolean,
				default:true
			},
			// 是否连跳两页
			backLastTwo:{
				type: String,
				default:''
			},
			// 返回首页图标
			showHomeIcon:{
				type:Boolean,
				default:true
			},
			// 跳转路径名称
			url:{
				type:String,
				default:''
			},
			// 详情名称
			detailTitle:{
				type:String,
				default:''
			}
		},
		data() {
			return {}
		},
		methods:{
			lastPage(){
				// console.log("kkkkkkkkkkkkkkkkkkkkkk",this.backLastTwo)
				if(this.backLastTwo=='1'){
					uni.navigateBack({
						delta: 2
					});
				}
				
			},
			leftClick() {
			
				uni.switchTab({
					url: `/pages/index/index`
				})
			}
		}
	}
	
</script>

<style>
</style>
